<template>
    <div class="linkman">
        <div class="lk-box" v-for="(item,index) in linkmanList" :key="index">
            <p class="name">
                <i class="iconfont icon-people"></i>
                <span>{{item.chinese_name}}</span>
                <span> {{item.english_name}}</span>
            </p>
            <p class="phone" v-if="item.phone!=null && item.phone != ''">
                <a :href="'tel:'+ item.phone">
                <i class="iconfont icon-phone1"></i> {{item.phone}}</a></p>
            <p class="tel" v-if="item.tel!=null && item.tel != ''">
                <a :href="'tel:'+ item.tel">
                <i class="iconfont icon-phone"></i> {{item.tel}}</a></p>
            <p class="email" v-if="item.email!=null && item.email != ''">
                <a :href="'mailto:'+ item.email">
                <i class="iconfont icon-email"></i> {{item.email}}</a></p>
            <p class="company" v-if="item.company!=null && item.company != ''">
                <i class="iconfont icon-company"></i> {{item.company}}</p>
            <p class="job" v-if="item.position!=null && item.position != ''">
                <i class="iconfont icon-job"></i> {{item.position}}</p>
        </div>
    </div>
</template>

<script>
import { findNewsLinkman,recordIUseOrTelLinkMan } from '@/api/spread.js'
export default {
    data() {
        return {
            linkmanList: []
        }
    },
    mounted() {
        let spreadId = this.$route.query.spreadId
        if (spreadId) {
            this.$vux.loading.show('')
            findNewsLinkman(spreadId).then(resp => {
                this.linkmanList = resp.list
                this.$vux.loading.hide()
            }).catch(_ => {
                this.$vux.loading.hide()
            })
            recordIUseOrTelLinkMan(spreadId,10).then()
        }
    }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>

</style>
